package com.nulldev.util.net.packets.generic;

import com.nulldev.util.net.packets.APILevel;
import com.nulldev.util.net.packets.NetInfo;
import com.nulldev.util.net.packets.NetPacket;
import com.nulldev.util.net.packets.PacketManager;

@APILevel(level = 1)
public class PingPacket extends NetPacket{

	public PingPacket() {
		super("Ping Packet", "gen.ping", "user.ping");
	}

	@Override
	public void client(byte[] data, byte[] raw, final NetInfo client) {
	}

	@Override
	public void server(byte[] data, byte[] raw, NetInfo connection) {
		connection.sendBlocking(PacketManager.byID("gen.pong"));
	}
}
